package nextoffer.cainiao;

import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;


    public class Re {
        public static void main(String[] args) {
            Scanner in = new Scanner(System.in);
            int l,r;
            l = in.nextInt();
            r = in.nextInt();
            Map<Integer,Integer> map = new TreeMap<>();
            map.put(1,0);
            map.put(0,0);
            for(int i = 2; i <= 1e6; i+=2) {
                int t = i;
                int cnt = 0;
                while( t >0) {
                    if(t % 2 == 0) {
                        cnt ++;
                        t/=2;
                        if(map.containsKey(t)){
                            map.put(i, map.get(t) + cnt);
                            System.out.print("{" + i + "," + map.get(i) + "},");
                            break;
                        }
                    } else break;
                }
                if(map.containsKey(i))continue;
                else {
                    map.put(i, cnt);
                    System.out.print("{" + i + "," + map.get(i) + "},");
                }
            }
            int max = 0;
            if(l % 2 != 0)l++;
            for(int i = l; i <= r; i+=2){
                max = Math.max(map.getOrDefault(i, 0), max);
            }
            System.out.println(max);
        }
    }

